<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>红娘娘-用户</title>
<link rel="stylesheet" href="../lib/layui/css/layui.css">
<link rel="stylesheet" href="../res/static/css/index.css">
</head>
<body>
	<!-- nav部分 -->
	<div id="head"></div>
	<!-- banner部分 -->
	<div class="banner product">
		<div class="title">
			<p>高分用户</p>
			<p class="en">Product Display</p>
		</div>
	</div>
	<!-- main部分 -->
	<div class="main product">
		<div>
			搜索
			<form class="layui-form" action="">
				<div class="layui-inline">
					<label class="layui-form-label">输入框</label>
					<div class="layui-input-block">
						<input type="text" name="name" required lay-verify="required"
							placeholder="请输入标题" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-inline">
					<label class="layui-form-label">选择框</label>
					<div class="layui-input-block">
						<select name="pzl" lay-verify="required" id="type">

						</select>
					</div>
				</div>

				<div class="layui-inline">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>

					</div>
				</div>
			</form>
		</div>
		<div class="layui-container" id="box">
		
		</div>
		<div id="fy"></div>

	</div>
	<!-- footer部分 -->
	<div id="footer"></div>
	<script src="../lib/layui/layui.js"></script>
	<script src="../js/jquery-1.8.2.js"></script>
	<script>
		$("#head").load("页眉.html");
		$("#footer").load("页脚.html");
	</script>
	<script>
		layui.use([ 'form', 'upload', 'layer' ],
						function() {

							var form = layui.form;
							$(function() {
								$.ajax({
										url : '../city',
										type : "get",
										data : {
											},
										success : function(res) {
											var $select = $("#type");
											
											$select.append("<option value='0'>所有城市</option>");
											for (var i = 0; i < res.data.length; i++) {

											$select.append("<option value='"+res.data[i].CityId+"'>"+res.data[i].CityName+"</option>");
											}
										form.render();
										},
										dataType:"json"
								});
							});
						});
	</script>
	<script>
		//Demo
		layui.use('form', function() {
			var form = layui.form;

			//监听提交
			form.on('submit(formDemo)', function(data) {
				layer.msg(JSON.stringify(data.field));
				$.ajax({

					url : "../cxxx?page="+
							"1"+
							"&limit="+
							+"10",
					type : "get",
					data : data.field,
					success : function(res) {
						if(res.code==0){
							var $box=$("#box");
							//$box.enpty();
							for(var i=0;i<res.data.length;i++){
								
								var p=res.data[i];
								
								$box.append("<div class='content layui-row'>"+
								        "<div class='layui-col-xs12 layui-col-sm6 layui-col-md7 layui-col-lg6 content-img'><img src='../hhh/"+p.tupian+"'></div>"+
								       "<div class='layui-col-xs12 layui-col-sm6 layui-col-md5 layui-col-lg6 right'>"+
								          "<p class'label'>姓名"+p.name+"</p>"+
								          "<p class='detail'>性别"+p.sex+"</p>"+
								          "<p class='detail'>生日"+p.birthday+"</p>"+
								          "<p class='detail'>年龄"+p.age+"</p>"+
								          "<p class='detail'>城市"+p.xcity+"</p>"+
								          "<div><a href='newsDetail.html?id="+p.id+"'>查看 </a></div>"+
								       "</div></div>")
							}
						}
					}
				});
				return false;
			});
		});
	</script>
	<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
	<script>
		layui.config({
			base : '../res/static/js/'
		}).use('firm');
	</script>

</body>
</html>